package exception

import "fmt"

var ErrorAuthFailed = NewApiException(50001, "用户名/密码验证错误")

func ErrorServerInternal(format string, a ...any) *ApiException {

	return &ApiException{
		Code:    50000,
		Message: fmt.Sprintf(format, a...),
	}
}
func ErrorServerInternal1(format string) *ApiException {

	return &ApiException{
		Code:    50000,
		Message: format,
	}
}

func ErrorNotFound(format string, a ...any) *ApiException {
	return &ApiException{
		Code:    40400,
		Message: fmt.Sprintf(format, a...),
	}
}
